package com.itheima.test2;

public class TestLamdba {
    public static void main(String[] args) {
        useShowHandler(new ShowHandler() {
            @Override
            public void show() {
                System.out.println("我是匿名内部类中的方法");
            }
        });
        useShowHandler(()->{
            System.out.println("我是Lamdba中的方法");
        });
    }
    public static void useShowHandler(ShowHandler showHandler){
        showHandler.show();
    }
}
interface ShowHandler{
    public abstract void show();
}





